<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<a class="menu-toggler" id="menu-toggler"> <i
			class="menu-text"></i> 
</a>
<div class="sidebar" id="sidebar">
<!--图标按钮  -->
<div class="sidebar-shortcuts" id="sidebar-shortcuts">

     <div class="sidebar-shortcuts-large" id="sidebar-shortcuts-large">
        <a class="btn btn-success" href="mshop!getAllStore">
            <i class="icon-asterisk"></i>
        </a> <a class="btn btn-info"
                href="member!getAllMember?member.type=1">
            <i class="icon-group"></i>
        </a> <a class="btn btn-warning"
                href="integralrule!watchEnterpriseIntegralRule">
            <i class="icon-edit"></i>
        </a> <a class="btn btn-danger"
                href="weixinmenu!initWeiXinMenu"><i class="icon-coffee"></i></a>
    </div>
    <div class="sidebar-shortcuts-mini" id="sidebar-shortcuts-mini">
        <span class="btn btn-success"></span> <span class="btn btn-info"></span>
        <span class="btn btn-warning"></span> <span class="btn btn-danger"></span>
    </div> 
</div>
	<!--垂直导航栏-->
	<ul class="nav nav-list" id="menu-nav-list">
		 <!-- 首页 -->
		 <li class="home">
		     <a href="broadcastaction!goHome">
		         <i class="icon-home"></i> <span class="menu-text">首页</span>
		     </a>
		 </li>
		 <!--微信管理-->
	     <li class="weixinguanli wmmenu_6">
	        <a href="#" class="dropdown-toggle">
	            <i class="icon-cloud"></i> <span class="menu-text">微信管理</span><b class="arrow icon-angle-down"></b>
	        </a>
	        <ul class="submenu">
	            <li>
	                <a href="maccount!getWeixin">
	                    <i class="icon-double-angle-right"></i>查看平台信息
	                </a>
	            </li>
	            <li class="autoanswer">
	                <a href="#" class="dropdown-toggle">
	                    <i class="icon-list"></i>
	                    <span class="menu-text">自动回复</span> <b class="arrow icon-angle-down"></b>
	                </a>
	                <ul class="submenu">
	                    <li>
	                        <a href="reply!watchReply">
	                            <i class="icon-double-angle-right"></i>设置回复
	                        </a>
	                    </li>
	                    <li>
	                        <a href="reply!watchSubscribeReply">
	                            <i class="icon-double-angle-right"></i>设置关注时回复
	                        </a>
	                    </li>
	                    <li>
	                        <a href="question!watchQuestions">
	                            <i class="icon-double-angle-right"></i>设置关键字
	                        </a>
	                    </li>
	                    <li>
	                        <a href="wxReplyItem!watchReplyItem">
	                            <i class="icon-double-angle-right"></i>设置图文素材
	                        </a>
	                    </li>
	                    <li>
	                        <a href="weixinurlaction!watchAllWeixinUrl">
	                            <i class="icon-double-angle-right"></i>设置跳转链接
	                        </a>
	                    </li>
	                    <li>
	                        <a href="wxReplyItem!initTextureMember">
	                         <i class="icon-double-angle-right"></i>会员中心
	                     </a>
	                 </li>
	             </ul>
	         </li>
	         <li>
	             <a href="weixinmenu!initWeiXinMenu">
	                 <i class="icon-coffee"></i> <span class="menu-text">菜单管理</span>
	             </a>
	         </li>
			 <li>
	             <a href="microshopaction!getMicroshopUrl">
	                 <i class="icon-coffee"></i> <span class="menu-text">微店</span>
	             </a>
	         </li>
	     	</ul>
	 	</li>
	 	 <!--分店管理-->
		 <li class="fendianguanli wmmenu_7">
		     <a href="#" class="dropdown-toggle">
		         <i class="icon-asterisk"></i> <span class="menu-text">分店管理</span> <b class="arrow icon-angle-down"></b>
		     </a>
		     <ul class="submenu">
		         <li>
		             <a href="mshop!getAllStore">
		                 <i class="icon-double-angle-right"></i>企业分店
		             </a>
		         </li>
		         <li>
		             <a href="muser!getAllUser">
		                 <i class="icon-double-angle-right"></i>分店管理账号
		             </a>
		         </li>
		         <li>
		             <a href="muser!getAllUser1">
		                 <i class="icon-double-angle-right"></i>分店密码管理
		             </a>
		         </li>
		     </ul>
		 </li>
		 <!--充值记录-->
		 <li class="czjl wmmenu_8">
		     <a href="mbalance!watchEnterpriseBalance?index=1">
		         <i class="icon-bar-chart"></i> <span class="menu-text">充值记录</span>
		     </a>
		 </li>
		 <!--消费情况-->
		 <li class="xfjl wmmenu_9">
		     <a href="mbalance!getAllConsumePage?index=1&consume.shopId=0">
		         <i class="icon-flag"></i> <span class="menu-text">消费记录</span>
		     </a>
		 </li>
		 <!--消费审核-->
		 <li class="xiaofeishenhe">
		     <a href="#" class="dropdown-toggle">
		         <i class=" icon-bookmark"></i> <span class="menu-text">消费管理</span> <b class="arrow icon-angle-down"></b>
		     </a>
		     <ul class="submenu">
		         <li>
		             <a href="logconsumeexamineaction!watchManualExamine">
		                 <i class="icon-double-angle-right"></i>消费审核
		             </a>
		         </li>
		         <li>
		             <a href="logconsumeexamineaction!watchConsumeLogByPage?index=1">
		                 <i class="icon-double-angle-right"></i>消费记录
		             </a>
		         </li>
		     </ul>
		 </li>
		 <!--商品兑换-->
		 <li class="goodsexchange wmmenu_10">
		     <a href="#" class="dropdown-toggle">
		         <i class="icon-exchange"></i> <span class="menu-text">商品兑换</span> <b class="arrow icon-angle-down"></b>
		     </a>
		     <ul class="submenu">
		         <li>
		             <a href="exchangegood!watchExgoods">
		                 <i class="icon-double-angle-right"></i>兑换管理
		             </a>
		         </li>
		         <li>
		             <a href="exchangegood!watchExLog">
		                 <i class="icon-double-angle-right"></i>兑换记录
		             </a>
		         </li>
		          <li>
		             <a href="exchangegood!watchExchangeGoods">
		                 <i class="icon-double-angle-right"></i>兑换商品库存
		             </a>
		         </li>
		     </ul>
		 </li>
		 <!--会员管理-->
		 <li class="membership wmmenu_11">
		     <a href="#" class="dropdown-toggle">
		         <i class="icon-group"></i> <span class="menu-text">会员管理</span> <b class="arrow icon-angle-down"></b>
		     </a>
		     <ul class="submenu">
		         <li>
		             <a href="member!getAllMember?index=1">
		                 <i class="icon-double-angle-right"></i>查看会员
		             </a>
		         </li>
		         <li>
		             <a href="member!toReadCSVFile">
		                 <i class="icon-double-angle-right"></i>会员导入
		             </a>
		         </li>
		         <li>
		             <a href="member!toaAddMember">
		                 <i class="icon-double-angle-right"></i>添加会员
		             </a>
		         </li>
		     </ul>
		 </li>
		 <!--积分管理-->
		 <li class="jifenguanli wmmenu_12">
		     <a href="#" class="dropdown-toggle">
		         <i class="icon-edit"></i>
		         <span class="menu-text">积分管理</span> <b class="arrow icon-angle-down"></b>
		     </a>
		     <ul class="submenu">
		         <li>
		             <a href="integralrule!watchEnterpriseIntegralRule">
		                 <i class="icon-double-angle-right"></i>积分规则
		             </a>
		         </li>
		         <li>
		             <a href="bAnnouncement!selectBAnnouncement">
		                 <i class="icon-double-angle-right"></i>积分活动
		             </a>
		         </li>
		     </ul>
		 </li>
	  	 <!--退换审核-->
		 <li class="tuihuan wmmenu_15">
		     <a href="#" class="dropdown-toggle">
		         <i class="icon-pencil"></i>
		         <span class="menu-text">退换审核</span> <b class="arrow icon-angle-down"></b>
		     </a>
		     <ul class="submenu">
		         <li>
		             <a href="bApplication!accountAuditorSelect?passType=4">
		                 <i class="icon-double-angle-right"></i>消费退换审批
		             </a>
		         </li>
		         <li>
		             <a href="bApplication!accountAuditorSelectBalance?passType=4">
		                 <i class="icon-double-angle-right"></i>充值退换审批
		             </a>
		         </li>
		     </ul>
		 </li>
		 
		 <!-- 增值服务 -->
		 <li class="zfb wmmenu_4">
		     <a href="#" class="dropdown-toggle">
		         <i class="icon-calendar"></i>
		         <span class="menu-text">增值服务</span> <b class="arrow icon-angle-down"></b>
		     </a>
		     <ul class="submenu">
		         <li>
		             <a href="tariffaction!watchAllTariff">
		                 <i class="icon-double-angle-right"></i>我要购买
		             </a>
		         </li>
		         <li>
		             <a href="orderInfoaction!watchMyOrderInfo">
		                 <i class="icon-double-angle-right"></i>我的订单
		             </a>
		         </li>
		         <li>
		             <a href="accountalipaygoodsaction!watchAccountAlipayGoods">
		                 <i class="icon-double-angle-right"></i>我的服务
		             </a>
		         </li>
		     </ul>
		 </li>
		 <!--运营平台-->
		 <li class="yunying wmmenu_1">
		     <a href="#" class="dropdown-toggle">
		         <i class="icon-th"></i>
		         <span class="menu-text">运营平台</span> <b class="arrow icon-angle-down"></b>
		     </a>
		     <ul class="submenu">
		         <li>
		             <a href="maccount!findAllAccountByPage?index=1">
		                 <i class="icon-double-angle-right"></i>企业统计
		             </a>
		         </li>
		         <li>
		             <a href="smsLog!getList">
		                 <i class="icon-double-angle-right"></i>短信日志
		             </a>
		         </li>
		         <li>
		             <a href="tariffaction!getList">
		                 <i class="icon-double-angle-right"></i>商品列表
		             </a>
		         </li>
		         <li>
		             <a href="tariffaction!toJSP">
		                 <i class="icon-double-angle-right"></i>商品编辑
		             </a>
		         </li>
		     </ul>
		 </li>
		 <!-- 发布消息 -->
		 <li class="xiaoxi wmmenu_13">
		     <a href="broadcastaction!getBroadcastByPage?index=1">
		         <i class="icon-bullhorn"></i> <span class="menu-text">发布消息</span>
		     </a>
		 </li>
		 <!-- 支付宝充值对账 -->
		 <li class="chongzhiduizhang wmmenu_16">
		     <a href="mbalance!goToSuperAdminDirectCSV">
		         <i class="icon-retweet"></i> <span class="menu-text">充值对账</span>
		     </a>
		 </li>
		 <!-- 功能权限 -->
		 <li class="gongneng wmmenu_14">
		     <a href="functionaction!watchAllFunction">
		         <i class="icon-eye-open"></i> <span class="menu-text">功能权限</span>
		     </a>
		 </li>
		 <!--安全退出-->
		 <li>
		     <a href="member!logout">
		         <i class="icon-off"></i> <span class="menu-text">安全退出</span>
		     </a>
		 </li>
	</ul>
	<!--小屏幕显示按钮 -->
    <div class="sidebar-collapse" id="sidebar-collapse">
        <i class="icon-double-angle-left" data-icon1="icon-double-angle-left"
           data-icon2="icon-double-angle-right"></i>
    </div>
</div>

<script type="text/javascript">
	$(document).ready(function() {
		$(".weixinguanli").hide();
		$(".fendianguanli").hide();
		$(".czjl").hide();
		$(".xfjl").hide();
		$(".goodsexchange").hide();
		$(".membership").hide();
		$(".jifenguanli").hide();
		$(".tuihuan").hide();
		$(".zfb").hide();
		$(".yunying").hide();
		$(".xiaoxi").hide();
		$(".gongneng").hide();
		$(".chongzhiduizhang").hide();
		$(".xiaofeishenhe").hide();
		
		$.ajax({
			url : "funcprivilegeaction!getFuncPrivilege",
			type : "post",
			datatype : "json",
			success : function(data) {
				var d = $.parseJSON(data);
				for ( var i = 0; i < d.length; i++) {
					var array_element = d[i];
					if (array_element.onOff == '0') {
						$(".wmmenu_" + array_element.functionId).hide();
					}else{
						$(".wmmenu_" + array_element.functionId).show();
					};
				}
			
				// 判断杭州晓荷贸易公司的功能权限
				$.ajax({
					url : "logconsumeexamineaction!verifyLoginFromAccount",
					type : "post",
					datatype : "json",
					success : function(data) {
						var d = $.parseJSON(data);
						if (d.temp == 'yes') {
							$(".xiaofeishenhe").show();
							$(".xfjl").hide();
						}else if (d.temp == 'no') {
							$(".xiaofeishenhe").hide();
							$(".xfjl").show();
						}
					},
					error : function(request) {
						alert("Connection error");
					}
				});
			},
			error : function(request) {
				alert("Connection error");
			}
		});
		
	});
</script>